// const { hot } = require('uni-pages-hot-modules')
module.exports = (pagesJson) => {

	const appPages = [{
		"path": "pages/login/login_psd", //密码登陆
		"style": {}
	}, {
		"path": "pages/index/index", //首页
		"style": {}
	}, {
		"path": "pages/chat/index", //聊天
		"style": {}
	}, {
		"path": "pages/chat/info", //聊天
		"style": {}
	}, {
		"path": "pages/chat/more", //聊天
		"style": {}
	}, {
		"path": "pages/chat/video", //聊天
		"style": {}
	}, {
		"path": "pages/chat/add", //添加好友
		"style": {}
	}, {
		"path": "pages/chat/group_member", //聊天
		"style": {}
	}, {
		"path": "pages/chat/group_info", //群聊信息修改
		"style": {}
	}, {
		"path": "pages/mine/index", //我的
		"style": {}
	}, {
		"path": "pages/mine/cttSend", //ctt转赠
		"style": {}
	}, {
		"path": "pages/mine/team", //我的团队
		"style": {}
	}, {
		"path": "pages/mine/info", //个人信息
		"style": {}
	}, {
		"path": "pages/mine/invite", //邀请
		"style": {}
	}, {
		"path": "pages/mine/log", //日志
		"style": {}
	}, {
		"path": "pages/mine/label", //标签
		"style": {}
	}, {
		"path": "pages/mine/friend_center", //我的好友详情
		"style": {}
	}, {
		"path": "pages/mine/friend", //我的朋友圈
		"style": {}
	}, {
		"path": "pages/mine/fws", //服务商
		"style": {}
	}, {
		"path": "pages/mine/usdt_recharge", //usdt_recharge
		"style": {}
	}, {
		"path": "pages/mine/usdt_withdraw", //usdt_withdraw
		"style": {}
	}, {
		"path": "pages/mine/usdt_log", //usdt_log
		"style": {}
	}, {
		"path": "pages/other/about_us", //关于我们
		"style": {}
	}, {
		"path": "pages/other/set", //个人设置
		"style": {}
	}, {
		"path": "pages/other/notice", //平台公告
		"style": {}
	}, {
		"path": "pages/other/external_page", //网页链接
		"style": {}
	}, {
		"path": "pages/other/address", //地址管理
		"style": {}
	}, {
		"path": "pages/other/address_info", //地址管理-新增编辑
		"style": {}
	}, {
		"path": "pages/other/document", //文档详情
		"style": {}
	}, {
		"path": "pages/other/ad_info", //广告图片
		"style": {}
	}, {
		"path": "pages/login/find_psd", //找回/修改密码
		"style": {}
	}, {
		"path": "pages/login/find_pay_psd", //修改-支付密码
		"style": {}
	}, {
		"path": "pages/login/register", //注册
		"style": {}
	}, {
		"path": "pages/square/index", //广场
		"style": {}
	}, {
		"path": "pages/square/ad_detail", //广场-广告详情
		"style": {}
	}, {
		"path": "pages/square/friends_post", //朋友圈-发布
		"style": {}
	}, {
		"path": "pages/ecology/index", //生态
		"style": {}
	}, {
		"path": "pages/ecology/tree", //生态-人脉之树
		"style": {}
	}, {
		"path": "pages/ecology/tree_two", //生态-人脉之树2.0
		"style": {}
	}, {
		"path": "pages/ecology/exchange_log", //生态-购买记录
		"style": {}
	}, {
		"path": "pages/ecology/tree_pledge_list", //生态-质押列表
		"style": {}
	}, {
		"path": "pages/crystal/index", //供应链-列表
		"style": {}
	}, {
		"path": "pages/crystal/detail", //供应链-详情
		"style": {}
	}, {
		"path": "pages/crystal/order", //供应链-订单
		"style": {}
	},
	{
		"path": "pages/redPacket/index", //红包-首页
		"style": {}
	},
	{
		"path": "pages/redPacket/release", //红包-发布
		"style": {}
	},
	{
		"path": "pages/redPacket/log", //红包-记录
		"style": {}
	},
	//  旺兔大逃杀 game相关
	{
		"path": "pages/gameDts/page/game",
		"style": {
			"navigationBarTitleText": "",
			"navigationStyle": "custom"
		}
	}, {
		"path": "pages/gameDts/page/record",
		"style": {
			"navigationBarTitleText": "",
			"navigationStyle": "custom"
		}
	}, {
		"path": "pages/gameDts/page/record_more",
		"style": {
			"navigationBarTitleText": "",
			"navigationStyle": "custom"
		}
	}, {
		"path": "pages/gameDts/page/rank_list",
		"style": {
			"navigationBarTitleText": "",
			"navigationStyle": "custom"
		}
	}, {
		"path": "pages/gameDts/page/rule",
		"style": {
			"navigationBarTitleText": "",
			"navigationStyle": "custom"
		}
	}];

	const pcPages = [{
		"path": "pages/login/register", //注册
		"style": {}
	}, {
		"path": "pages/other/document", //文档
		"style": {}
	}, {
		"path": "pages/other/ad_info", //广告图片
		"style": {}
	}];

	let nowpages = [];
	if (process.env.VUE_APP_PLATFORM == 'h5') {
		console.log(process.env.NODE_ENV);
		if (process.env.NODE_ENV == 'development') {
			nowpages = appPages.concat(pcPages);
		} else {
			nowpages = pcPages;
		}
	} else if (process.env.VUE_APP_PLATFORM == 'app-plus') {
		nowpages = appPages;
	}
	nowpages.forEach(li => {
		li.style['app-plus'] = {
			"bounce": "none", //关闭窗口回弹效果
		}
	})
	// console.log('nowpages:P', nowpages);

	return {
		// 合并pages.json的内容  
		pages: nowpages,
		"globalStyle": {
			"titleNView": false,
			"navigationBarTitleText": "ChatterBox",
			"navigationBarTextStyle": "black"
		},
		"tabBar": {
			"color": "#C8C8C8",
			"selectedColor": "#333333",
			"borderStyle": "white",
			"backgroundColor": "#ffffff",
			"list": [{
				"pagePath": "pages/chat/index",
				"iconPath": "static/tabbar/img_1.png",
				"selectedIconPath": "static/tabbar/img_2.png",
				"text": "会话"
			},
			{
				"pagePath": "pages/square/index",
				"iconPath": "static/tabbar/img_3.png",
				"selectedIconPath": "static/tabbar/img_4.png",
				"text": "广场"
			},
			{
				"pagePath": "pages/ecology/index",
				"iconPath": "static/tabbar/img_5.png",
				"selectedIconPath": "static/tabbar/img_6.png",
				"text": "生态"
			},
			{
				"pagePath": "pages/mine/index",
				"iconPath": "static/tabbar/img_7.png",
				"selectedIconPath": "static/tabbar/img_8.png",
				"text": "我的"
			}
			]
		},
		"easycom": {
			"^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "uni_modules/z-paging/components/z-paging$1/z-paging$1.vue"
		}
	}
}